<div class="bg-light lter b-b wrapper-md">
  <h1 class="m-n font-thin h3">创建商品</h1>
</div>
<div class="wrapper-md">

  <tabset class="tab-container" >


    <tab heading="{{item.remark}}" 
      
      active="item.active"
      select="steps.percent=10"
      ng-repeat="item in arr"
    >
      <!-- <p class="m-b">{{item.remark}}</p>

      <progressbar value="steps.percent" class="progress-xs" type="success"></progressbar>
 -->
      <form name="step[$index]" class="form-horizontal form-validation"
        ng-if="$index != arr.length - 1"
      >

      <goodsform
        item=item
        result="result"
        dateshow="dateshow"
        timeshow="timeshow"
        imageshow="imageshow"
        selectobj="selectobj"
        model="model"
        hstep="hstep"
        mstep="mstep"
        ismeridian="ismeridian"
      ></goodsform>
      

        <div class="m-t m-b">
          <button type="button" 
          class="btn btn-default btn-rounded" 
          ng-click="pre(arr, $index)"
          ng-if="$index != 0"
          >上一步</button>
          <button type="button" 
          class="btn btn-default btn-rounded" 
          ng-disabled="step[$index].$invalid" 
          ng-click="next(arr, $index)"
          ng-if="$index != arr.length - 2"
          >下一步</button>

          <button type="submit" class="btn btn-default btn-rounded" 
          ng-click="gogogolist()"
          ng-if="($index + 1) == arr.length - 1"
          >保存并返回列表</button>

          <button type="submit" class="btn btn-default btn-rounded" 
          ng-click="gogogo()"
          ng-if="($index + 1) == arr.length - 1"
          >保存并设置渠道</button>

        </div>
      </form>



      <div class="hbox hbox-auto-xs hbox-auto-sm"
        ng-if="$index == arr.length - 1"
       >
      <div class="col w-md bg-light dk b-r ">

        <div class="wrapper">
          <ul class="list-group list-group-sp">
            <li class="list-group-item "
              ng-repeat="item in channelarr"
              ng-click="choicechannel(item)"
              style="cursor: pointer;" 
            >
                {{item.templete_name}}
                <span class="pull-right text-success"
                ng-if="item.haschannel == true"
                ><i class="fa fa-check"></i></span>
            </li>
          </ul>

        </div>
      </div>


      <div class=" col">

        <goodsform
          item="channelitem"
          result="channelresult"
          dateshow="channeldateshow"
          timeshow="channeltimeshow"
          imageshow="channelimageshow"
          model="model"
          hstep="hstep"
          mstep="mstep"
          ismeridian="ismeridian"
        ></goodsform>

        <div class="m-t m-b ml10">

          <button type="submit" class="btn btn-default btn-rounded" 
          ng-click="savechannel()"
          >保存</button>

        </div>

      </div>
      </div>



    </tab>


  </tabset>



</div>




<!-- 
<div ng-if="goodscode != ''">
<div class="bg-light lter b-b wrapper-md">
  <blockquote>
  <p>设置销售渠道</p>
  <footer>{{channelitem.templete_name}}</footer>
</blockquote>


</div>
<div class="hbox hbox-auto-xs hbox-auto-sm" >
<div class="col w-lg bg-light dk b-r ">

  <div class="wrapper-md">
    <ul class="list-group list-group-sp">
      <li class="list-group-item "
        ng-repeat="item in channelarr"
        ng-click="choicechannel(item)"
        style="cursor: pointer;" 
      >
          {{item.templete_name}}
          <span class="pull-right text-success"
          ng-if="item.haschannel == true"
          ><i class="fa fa-check"></i></span>
      </li>
    </ul>

  </div>
</div>


<div class=" col">

  <goodsform
    item="channelitem"
    result="channelresult"
    dateshow="channeldateshow"
    timeshow="channeltimeshow"
    imageshow="channelimageshow"
    model="model"
    hstep="hstep"
    mstep="mstep"
    ismeridian="ismeridian"
  ></goodsform>

  <div class="m-t m-b ml10">

    <button type="submit" class="btn btn-default btn-rounded" 
    ng-click="savechannel()"
    >保存</button>

  </div>

</div>
</div>
</div> -->